package com.ben.xinyue.seckill.service;

import com.ben.xinyue.seckill.domain.entity.User;
import com.ben.xinyue.seckill.mapper.UserMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class UserService  {

    private final UserMapper userMapper;
    private final RedisTemplate redisTemplate;

    public User search(){
        redisTemplate.opsForValue().set("abc","a");
        return userMapper.selectById(1);
    }
}